package com.vhall.component.entity.account.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author song.dong
 * @date 2021-07-30 16:40
 */

@Data
public class AdmEditReqVO implements Serializable {

    @NotNull(message = "admin_id is not null")
    @ParamName("admin_id")
    private Integer adminId;

    @NotBlank(message = "admin_name is not null")
    @ParamName("admin_name")
    @Length(min = 1, max = 8, message = "admin_name长度错误")
    private String adminName;

    @ParamName("nick_name")
    private String nickName;

    @ParamName("password")
    private String password;

    @ParamName("confirm_password")
    private String confirmPassword;

    @ParamName("mobile")
    private String mobile;

    @NotBlank(message = "email is not null")
    @Email(message = "邮箱格式错误")
    @Length(min = 1, max = 30, message = "email长度错误")
    private String email;

    @NotNull(message = "roleId is not null")
    @ParamName("role_id")
    private Integer roleId;
}
